package org.budo.gitee.api;

import org.budo.gitee.api.response.GiteeUserResponse;
import org.budo.support.http.client.HttpUtil;
import org.budo.support.http.client.Response;

/**
 * @author lmw
 */
public class GiteeUserApi {
    public GiteeUserResponse user(String accessToken) {
        String url = "https://gitee.com/api/v5/user?access_token=" + accessToken;
        Response userResponse = HttpUtil.get(url);

        return new GiteeUserResponse(userResponse);
    }
}